echo alert php

53

php echo alert js -

echo '<script type="text/javascript">alert("Data has been submitted to ' . $to . '");</script>';

alert in php -

// This is in the PHP file and sends a Javascript alert to the client
$message = "Something";
echo "<script type='text/javascript'>alert('$message');</script>";

alert a php variable -

echo '<script type="text/javascript">alert("'.$error.'");</script>';

Comments

Submit
0 Comments